/* 
 * File:   Main.h
 * Author: cow
 *
 * Created on April 7, 2011, 4:02 PM
 */

#ifndef _MAIN_H
#define	_MAIN_H

//standard includes--------------------
#include <map>
//#include <pthread.h>
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <gtkmm/builder.h>
#include <glibmm/ustring.h>
using namespace std;

//defines------------------------------
namespace stalemateMain{
#define MainWin "MainWindow"
#define TBOX "CenterSpace"
#define dataFile "./data/stale.dat"
extern string fleetDir;
extern string mapDir;
extern string saveDir;
}

//prototypes---------------------------
int main(int argc, char* argv[]);
//globals-----
extern Glib::RefPtr<Gtk::Builder> builder;
extern Glib::ustring gladeDir;
//------------
namespace stalemateMain{
class controll;
}

//nonstandard includes-----------------
#include "gui/intro.h"
#include "PlayerData/mapdata.h"
#include "PlayerData/players.h"
//definitions--------------------------

namespace stalemateMain{
//MainScreen+++++++
class controll : public Gtk::Window{
public:
    //contructors-------
    static controll* gsControll();
    controll(BaseObjectType* obj, const Glib::RefPtr<Gtk::Builder>& window);
    ~controll();
    //memory------------
    virtual void remember(Gtk::Widget* wdgt);
	//gloabalish data---
	mapdata::maprep* gGameMap();
	void rGameMap();
	Players::playerLib* gPlayers();
	void rPlayers();
private:
	//graphics structures
    static controll* screen;
    Gtk::VBox* box;
    Gtk::Widget* active;
	//libraries
	mapdata::maprep* mrep;
	Players::playerLib* players;
	//mutexes
	pthread_mutex_t* mrepMute;	
	pthread_mutex_t* playerMute;
};
}

#endif	/* _MAIN_H */

